package org.noote.libs.computervision.math;

public class Point2D {
	public int x=0;
	public int y=0;
	
	public Point2D()
	{
		this.x = 0;
		this.y = 0;
	}
	public Point2D(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public void set(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public float getLength()
	{
		return (float)Math.sqrt(x*x + y*y);
	}
	
	public void normalize()
	{
		float l=getLength();
		x/=l;
		y/=l;
	}	
	
}
